import $ from 'jquery'
var T$ = $.noConflict();
console.log(T$('body').html())

function getOrderList() {
  var listData = [];
  var items = document.getElementsByClassName('list-content')[0].getElementsByClassName('list')[0].getElementsByTagName('li');
  for (let index = 0; index < items.length; index++) {
    const element = items[index];
    var time = element.getElementsByClassName('time')[0];
    var a = element.getElementsByClassName('text')[0];
    listData.push({
      index: index + 1,
      id: index,
      title: a.innerText,
      href: a.href,
      time: time.innerText,
      img: 'http://www.gov.cn/govweb/c1293/202112/5665879/images/dd12f91c3e4a496dbd0d2ef34dee7734.jpg',
      status: 1,
      userName: '张三',
      userPhone: '18912345678',
      userAddress: '湖北省武汉市洪山区雄楚大道93号'
    })
  }
  localStorage.setItem('order_list', JSON.stringify(listData));
  return listData;
}

export {
  getOrderList
}